<template>
  <div class="counter-container">
    <vueCounter class="counter" :endVal="number" :duration="4000"/>
    <div class="text">{{ text }}</div>
  </div>
</template>

<script>
import vueCounter from "vue-count-to";
export default {
  components: {
    vueCounter,
  },
  props: {
    number: {
      type: Number,
      default: 0,
    },
    text: {
      type: String,
      default: "",
    },
  },
};
</script>

<style lang="scss" scoped>
.counter-container {
  width: 25vw;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  .counter {
    color: #285fce;
    font-size: 30px;
    font-weight: bold;
    margin-bottom: 5px;
  }
  .text {
    color: #5e5e5e;
  }
}
</style>
